import {upload} from './api'
export default (file,callback)=>{
        const fileName = new Date().getTime()+file.name
        const param = new FormData();
        param.append('images',file,fileName);
        console.log(param)
        upload(param).then(res=>{
                const {list} = res
                const [pathItem] = list
                callback(pathItem.pathUrl)
        })
}
